﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="uImg.aspx.cs" Inherits="OsPortal.oAppCore.Core.ImageUpload.uImg" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title>Insert Image</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="noindex, nofollow" name="robots" />

    <script type="text/javascript" src="../../js/oAttribute.js"></script>

    <link href="style.css" type="text/css" rel="Stylesheet" />

    <script type="text/javascript" src="osplug.js"></script>

    <script type="text/javascript">
    window.onload = function (){
        document.body.style.padding = '0px';
	    oEditor.FCKLanguageManager.TranslatePage( document ) ;
		LoadSelection();	    
	    dialog.SetOkButton( false ) ;
	    dialog.SetAutoSize( true ) ;
    };
    </script>

</head>
<body>
    <div style="width: 400px; padding: 5px;">
        <form id="frmUploadItem" runat="server" onsubmit="return CheckUpload();">
        <div class="Title">
            Ảnh cần up load</div>
        <table style="width: 380px; border: 0px;" cellspacing="1" cellpadding="1">
            <tr>
                <td style="width: 120px;">
                    Nguồn ảnh
                </td>
                <td id="imgSource">
                    <input id="imgupload" type="file" size="35" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    Liên kết
                </td>
                <td>
                    <input id="hyperlink" name="hyperlink" runat="server" type="text" maxlength="65"
                        size="35" />
                </td>
            </tr>
            <tr>
                <td>
                    Mô tả
                </td>
                <td>
                    <input id="description" name="description" type="text" runat="server" maxlength="65"
                        size="35" />
                </td>
            </tr>
        </table>
        <br />
        <div class="Title">
            Thuộc tính ảnh</div>
        <table style="width: 400px; border: 0px;" cellspacing="1" cellpadding="1">
            <tr>
                <td style="width: 100px">
                    Chiều rộng:
                </td>
                <td style="width: 50px">
                    <input id="image_width" onkeyup="OnSizeChanged('Width',this.value);" runat="server"
                        type="text" maxlength="4" size="3" name="image_width" />
                </td>
                <td style="width: 80px">
                    Chiều cao
                </td>
                <td style="width: 50px">
                    <input id="image_height" onkeyup="OnSizeChanged('Height',this.value);" runat="server"
                        type="text" maxlength="4" size="3" name="image_height" />
                </td>
                <td align="left">
                    <div id="btnLockSizes" class="BtnLocked" onclick="SwitchLock(this);" title="Lock Ratio"
                        onmouseout="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' );" onmouseover="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ) + ' BtnOver';">
                    </div>
                    <div id="btnResetSize" class="BtnReset" onclick="ResetSizes();" title="Reset Size"
                        onmouseout="this.className='BtnReset';" onmouseover="this.className='BtnReset BtnOver';">
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input onclick="image_width.value=400;image_height.value=300;" type="button" value="Ảnh đứng"
                        name="Portrait" disabled="disabled" />
                </td>
                <td>
                </td>
                <td colspan="2">
                    <input onclick="image_width.value=300;image_height.value=400;" type="button" value="Ảnh ngang"
                        name="Landspace" disabled="disabled" />
                </td>
            </tr>
            <tr>
                <td>
                    Biên ngang:
                </td>
                <td>
                    <input id="hspace" type="text" maxlength="3" size="3" value="0" name="hspace" runat="server" />
                </td>
                <td>
                    Biên dọc:
                </td>
                <td colspan="2">
                    <input id="vspace" type="text" maxlength="3" size="3" value="0" name="vspace" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    Đường viền:
                </td>
                <td>
                    <input id="oborder" type="text" maxlength="3" size="3" value="0" name="oborder" runat="server" />
                </td>
                <td>
                    Vị trí:
                </td>
                <td colspan="2">
                    <select id="oalign" name="oalign" style="width: 100px;" runat="server">
                        <option value="">Không chọn</option>
                        <option value="Top">Trên</option>
                        <option value="Middle" selected="selected">Giữa</option>
                        <option value="Bottom">Dưới</option>
                        <option value="TextTop">Chữ phía trên</option>
                        <option value="ABSMiddle">Giữa tuyệt đối</option>
                        <option value="ABSBottom">Dưới tuyệt đối</option>
                        <option value="Left">Trái</option>
                        <option value="Right">Phải</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:CheckBox ID="chkSaveForWeb" Checked="true" runat="server" Text="Kích thước tối thiểu cho web" />
                </td>
                <td>
                    Định dạng kiểu:
                </td>
                <td colspan="2">
                    <select id="ostyle" name="ostyle" style="width: 100px;" runat="server">
                        <option value="" selected="selected">none</option>
                        <option value="oImgLeft">Căn trái</option>
                        <option value="oImgRight">Căn phải</option>
                    </select>
                </td>
            </tr>
        </table>
        <br />
        <div style="text-align: right;">
            <asp:Button ID="UploadButton" CssClass="Button" Width="74px" Text="Đồng ý" runat="server"
                OnClick="UploadButton_Click"></asp:Button></div>
        </form>
    </div>
</body>
</html>
